package com.fzg.controller;

import com.fzg.common.enums.ResponseWrapper;
import com.fzg.service.CountryNameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 存储世界上全部国家的英文名，中文名 前端控制器
 * </p>
 *
 * @author fzg
 * @since 2022-11-17
 */
@RestController
@RequestMapping("/country-name")
public class CountryNameController {

    @Autowired
    private CountryNameService countryNameService;

    /**
     *
     * @return ResponseWrapper
     */
    @GetMapping("/pushDataToMysql")
    public ResponseWrapper pushDataToMysql(){
        return ResponseWrapper.markSuccess(countryNameService.getWorldCountry());
    }



}
